﻿<%@ Page Title="Using Postback" Language="C#" MasterPageFile="~/Demo.master" Inherits="DemoPage" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>

<script runat="server">
    protected void OnTabActived(object sender, EventArgs e)
    {
        Label lb = new Label();
        lb.Text = "This label is added by server active event";
        View2.Controls.Add(lb);
    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help ui-corner-all" style="margin-bottom: 10px;">
        Tabs can raise server event by selected tab changes by set <b>AutoPostBack</b> to
        "true". And also raising <b>Actived</b> and <b>Deactived</b> events of View control.
    </div>
    <DotNetAge:Tabs ID="Tabs1" runat="server" AutoPostBack="true">
        <Views>
            <DotNetAge:View ID="View1" runat="server" Text="About">
               <p>
                    Tabs is a ASP.NET WebControl that encapsulated the jQuery UI tabs plugin.Tabs are
                    generally used to break content into multiple sections that can be swapped to save
                    space, much like an Accordion.
                </p>
                <p>
                    By default a Tabs will swap between tabbed sections onClick, but the events can
                    be changed to onHover through an property. Tab content can be loaded via Ajax by
                    setting an NavigateUrl on a View Control.
                </p
            </DotNetAge:View>
            <DotNetAge:View ID="View2" runat="server" Text="KeepOpen" OnActive="OnTabActived">
            </DotNetAge:View>
        </Views>
    </DotNetAge:Tabs>
    <br />
    <demo:Code runat="server" ID="codeView" SourceFile="~/Tabs/Codes/PostBackSample.aspx" />
</asp:Content>
